import Demos from '@/datas/Demos'

export const useGoodsDebug = () => {
	const consoleLogSkus = (skus: any[]) => {
		console.log(JSON.stringify(skus))
	}

	const consoleLogAttrs = (attrs: any[]) => {
		console.log(JSON.stringify(attrs))
	}

	const consoleLogSelectedAttrVs = (attrVSelects: string[]) => {
		console.log(JSON.stringify(attrVSelects))
	}

	const generateDemoSkus = (attrs: any[], generateSkus: () => void) => {
		attrs.splice(0, attrs.length, ...Demos.skuAttrs)
		generateSkus()
	}

	return {
		consoleLogSkus,
		consoleLogAttrs,
		consoleLogSelectedAttrVs,
		generateDemoSkus
	}
}
